﻿@{
    ViewBag.Title = "交易记录";
    Layout = "~/Views/Shared/_LayoutFore.cshtml";
}
@section script{
    <script src="~/Content/assets/DatePicker/WdatePicker.js"></script>
    <script type="text/javascript">
        //根据时间查询
        function fundsFlowSearch() {
            $("#formFundsFlowListTime").submit();
        }

        var util = {};
        var options = {
            listUrl: "@Url.Action("FundsFlowList")"
        };

        $(document).ready(function () {
            var gridopt = {
                url: options.listUrl,
                colModel: [
                    { display: '编号', name: 'Id', width: "5%", sortable: true, hide: true, align: 'left', iskey: true },
                    { display: '日期', name: 'CreateTime', width: "20%", sortable: false, hide: false, align: 'left' },
                    { display: '类型', name: 'Type', width: "10%", sortable: false, align: 'left', process: fromatType },
                    { display: '充入', name: 'InCome', width: "10%", sortable: false, align: 'left' },
                    { display: '取出', name: 'OutPay', width: "10%", sortable: false, align: 'left' },
                    { display: '支付方式', name: 'BankName', width: "10%", sortable: false, align: 'left' },
                    { display: '状态', name: 'Status', width: "10%", sortable: false, align: 'left', process: fromatStatus }
                ],
                sortname: "Id",
                sortorder: "DESC",
                title: false,
                rp: 14,
                usepager: true,
                showcheckbox: false
            };
            var xjgrid = new xjGrid("gridlist", gridopt);

            function fromatType(value, cell) {
                var ops = [];
                if (value == '1') {
                    ops.push("充值");
                }
                if (value == '2') {
                    ops.push("提现");
                }
                if (value == '3') {
                    ops.push("众筹投标");
                }
                if (value == '4') {
                    ops.push("债权投标");
                }
                if (value == '5') {
                    ops.push("投资收益");
                }
                if (value == '6') {
                    ops.push("手续费");
                }
                if (value == '7') {
                    ops.push("投资本金");
                }
                if (value == '8') {
                    ops.push("投资利息手续费");
                }
                if (value === '9') {
                    ops.push("众筹退款");
                }
                if (value == '10') {
                    ops.push("借款人还款");
                }
                if (value == '10') {
                    ops.push("借款人还款");
                } if (value == '11') {
                    ops.push("满标放款");
                }

                return ops.join("");
            }

            function fromatStatus(value, cell) {
                var ops = [];
                if (value == '1') {
                    return "成功";
                } else {
                    ops.push("失败");
                }
                return ops.join("");
            }

            $("#formFundsFlowListTime").submit(function () {
                xjgrid.Query(this);
                return false;
            });
        });
    </script>
}
<div class="RightContrent">
    <div style="margin-left: 50px; margin-right: 50px;">
        <div class="tab-content">
            <div class="line10"></div>
            <div class="line10"></div>
            <div class="tab_title">@ViewBag.Title</div>
            <div class="tab-content">
                <div style="width: 16px; height: 12px; float: left;">
                    <img src="~/Content/Images/leftarraw.png" />
                </div>
            </div>

            <div class="tab-content_border">
                <div class="toolbar-wrap">
                    <div id="floatHead1" class="toolbar">
                        <div class="r-list">
                            <form action="@Url.Action("FundsFlowList")" method="POST" id="formFundsFlowListTime">
                                从<input type="text" onclick="WdatePicker()" class="input txt" id="search_sdate" name="Sdate" placeholder="开始时间" />
                                到<input type="text" onclick="WdatePicker()" class="input txt" id="search_edate" name="Edate" placeholder="结束时间" />
                                <input type="button" value="查询" class="btn" accesskey="S" onclick="fundsFlowSearch()" />
                            </form>
                        </div>
                    </div>
                </div>

                <div id="gridlist">
                </div>
            </div>
        </div>
    </div>

</div>

